import React, {Component} from 'react'
import Info from './User/Info.js'
import Main from './User/Main.js'
import {BrowserRouter as Router, Route, Link} from 'react-router-dom'


class User extends Component {
    constructor(props) {
        super(props);
        this.state = {  };
    }
    render() {
        return (
            <Router>
               <div className="content">
                    <div className="left">
                    <Link to="/user/main">个人中心</Link>
                    <br/><br/>
                    <Link to="/user/">用户信息</Link>
                    <input type="text" value={`${this.props.match.url}/main`}/>
                    </div>
                    <div className="right">
                        <Route exact path="/user/" component={Info}/>
                        <Route  path={`${this.props.match.url}/main`} component={Main}/>
                    </div>
                </div>
            </Router>
        );
    }
}

export default User;